import Vue from "vue";
import Router from "vue-router";
import Login from "@/components/Login";
import Home from "@/components/Home";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "Login",
      component: Login
    },
    {
      path: "/home",
      name: "Home",
      component: Home,
      children: [
       
        {
          path: "tushu",
          name: "图书管理",
          component: () => import("../components/user/tushu")
        },
        {
          path: "Jieyuexinxi",
          name: "图书借阅信息",
          component: () => import("../components/xinxi/Jieyuexinxi")
        },
        {
          path: "Duzhe",
          name: "读者管理",
          component: () => import("../components/user/Duzhe")
        },
        {
          path: "Tushufenlei",
          name: "图书分类管理",
          component: () => import("../components/user/Tushufenlei")
        },
        {
          path: "Guihuanxinxi",
          name: "图书归还信息",
          component: () => import("../components/xinxi/Guihuanxinxi")
        },
        
        
      ]
    }
  ]
});
